.TH ARCHIVE_READ_HEADER 3 "February 2, 2012" ""
.SH NAME
.ad l
\fB\%archive_read_next_header\fP,
\fB\%archive_read_next_header2\fP
\- functions for reading streaming archives
.SH LIBRARY
.ad l
Streaming Archive Library (libarchive, -larchive)
.SH SYNOPSIS
.ad l
\fB#include <archive.h>\fP
.br
\fIint\fP
.br
\fB\%archive_read_next_header\fP(\fI\%struct\ archive\ *\fP, \fI\%struct\ archive_entry\ **\fP);
.br
\fIint\fP
.br
\fB\%archive_read_next_header2\fP(\fI\%struct\ archive\ *\fP, \fI\%struct\ archive_entry\ *\fP);
.SH DESCRIPTION
.ad l
.RS 5
.TP
\fB\%archive_read_next_header\fP()
Read the header for the next entry and return a pointer to
a
Tn struct archive_entry.
This is a convenience wrapper around
\fB\%archive_read_next_header2\fP()
that reuses an internal
Tn struct archive_entry
object for each request.
.TP
\fB\%archive_read_next_header2\fP()
Read the header for the next entry and populate the provided
Tn struct archive_entry.
.RE
.SH RETURN VALUES
.ad l
These functions return
\fBARCHIVE_OK\fP
(the operation succeeded),
\fBARCHIVE_WARN\fP
(the operation succeeded but a non-critical error was encountered),
\fBARCHIVE_EOF\fP
(end-of-archive was encountered),
\fBARCHIVE_RETRY\fP
(the operation failed but can be retried),
and
\fBARCHIVE_FATAL\fP
(there was a fatal error; the archive should be closed immediately).
.SH ERRORS
.ad l
Detailed error codes and textual descriptions are available from the
\fB\%archive_errno\fP()
and
\fB\%archive_error_string\fP()
functions.
.SH SEE ALSO
.ad l
\fBtar\fP(1),
\fBarchive_read\fP(3),
\fBarchive_read_data\fP(3),
\fBarchive_read_extract\fP(3),
\fBarchive_read_filter\fP(3),
\fBarchive_read_format\fP(3),
\fBarchive_read_open\fP(3),
\fBarchive_read_set_options\fP(3),
\fBarchive_util\fP(3),
\fBlibarchive\fP(3),
\fBtar\fP(5)
